//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension MigrationHubOrchestrator {
    // MARK: Enums

    public enum DataType: String, CustomStringConvertible, Codable, _SotoSendable {
        case integer = "INTEGER"
        case string = "STRING"
        case stringlist = "STRINGLIST"
        case stringmap = "STRINGMAP"
        public var description: String { return self.rawValue }
    }

    public enum MigrationWorkflowStatusEnum: String, CustomStringConvertible, Codable, _SotoSendable {
        case completed = "COMPLETED"
        case creating = "CREATING"
        case creationFailed = "CREATION_FAILED"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case deletionFailed = "DELETION_FAILED"
        case inProgress = "IN_PROGRESS"
        case notStarted = "NOT_STARTED"
        case paused = "PAUSED"
        case pausing = "PAUSING"
        case pausingFailed = "PAUSING_FAILED"
        case starting = "STARTING"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        case workflowFailed = "WORKFLOW_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum Owner: String, CustomStringConvertible, Codable, _SotoSendable {
        case awsManaged = "AWS_MANAGED"
        case custom = "CUSTOM"
        public var description: String { return self.rawValue }
    }

    public enum PluginHealth: String, CustomStringConvertible, Codable, _SotoSendable {
        case healthy = "HEALTHY"
        case unhealthy = "UNHEALTHY"
        public var description: String { return self.rawValue }
    }

    public enum RunEnvironment: String, CustomStringConvertible, Codable, _SotoSendable {
        case aws = "AWS"
        case onpremise = "ONPREMISE"
        public var description: String { return self.rawValue }
    }

    public enum StepActionType: String, CustomStringConvertible, Codable, _SotoSendable {
        case automated = "AUTOMATED"
        case manual = "MANUAL"
        public var description: String { return self.rawValue }
    }

    public enum StepGroupStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case awaitingDependencies = "AWAITING_DEPENDENCIES"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case paused = "PAUSED"
        case pausing = "PAUSING"
        case ready = "READY"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        public var description: String { return self.rawValue }
    }

    public enum StepStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case awaitingDependencies = "AWAITING_DEPENDENCIES"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case paused = "PAUSED"
        case ready = "READY"
        case userAttentionRequired = "USER_ATTENTION_REQUIRED"
        public var description: String { return self.rawValue }
    }

    public enum TargetType: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case none = "NONE"
        case single = "SINGLE"
        public var description: String { return self.rawValue }
    }

    public enum TemplateStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case created = "CREATED"
        public var description: String { return self.rawValue }
    }

    public enum StepInput: AWSEncodableShape & AWSDecodableShape, _SotoSendable {
        /// The value of the integer.
        case integerValue(Int)
        /// List of string values.
        case listOfStringsValue([String])
        /// Map of string values.
        case mapOfStringValue([String: String])
        /// String value.
        case stringValue(String)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .integerValue:
                let value = try container.decode(Int.self, forKey: .integerValue)
                self = .integerValue(value)
            case .listOfStringsValue:
                let value = try container.decode([String].self, forKey: .listOfStringsValue)
                self = .listOfStringsValue(value)
            case .mapOfStringValue:
                let value = try container.decode([String: String].self, forKey: .mapOfStringValue)
                self = .mapOfStringValue(value)
            case .stringValue:
                let value = try container.decode(String.self, forKey: .stringValue)
                self = .stringValue(value)
            }
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .integerValue(let value):
                try container.encode(value, forKey: .integerValue)
            case .listOfStringsValue(let value):
                try container.encode(value, forKey: .listOfStringsValue)
            case .mapOfStringValue(let value):
                try container.encode(value, forKey: .mapOfStringValue)
            case .stringValue(let value):
                try container.encode(value, forKey: .stringValue)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .listOfStringsValue(let value):
                try value.forEach {
                    try validate($0, name: "listOfStringsValue[]", parent: name, max: 100)
                }
            case .mapOfStringValue(let value):
                try value.forEach {
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, max: 100)
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, min: 1)
                    try validate($0.key, name: "mapOfStringValue.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                    try validate($0.value, name: "mapOfStringValue[\"\($0.key)\"]", parent: name, max: 100)
                }
            case .stringValue(let value):
                try self.validate(value, name: "stringValue", parent: name, max: 100)
            default:
                break
            }
        }

        private enum CodingKeys: String, CodingKey {
            case integerValue
            case listOfStringsValue
            case mapOfStringValue
            case stringValue
        }
    }

    public enum WorkflowStepOutputUnion: AWSEncodableShape & AWSDecodableShape, _SotoSendable {
        /// The integer value.
        case integerValue(Int)
        /// The list of string value.
        case listOfStringValue([String])
        /// The string value.
        case stringValue(String)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .integerValue:
                let value = try container.decode(Int.self, forKey: .integerValue)
                self = .integerValue(value)
            case .listOfStringValue:
                let value = try container.decode([String].self, forKey: .listOfStringValue)
                self = .listOfStringValue(value)
            case .stringValue:
                let value = try container.decode(String.self, forKey: .stringValue)
                self = .stringValue(value)
            }
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .integerValue(let value):
                try container.encode(value, forKey: .integerValue)
            case .listOfStringValue(let value):
                try container.encode(value, forKey: .listOfStringValue)
            case .stringValue(let value):
                try container.encode(value, forKey: .stringValue)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .listOfStringValue(let value):
                try value.forEach {
                    try validate($0, name: "listOfStringValue[]", parent: name, max: 100)
                }
            case .stringValue(let value):
                try self.validate(value, name: "stringValue", parent: name, max: 100)
            default:
                break
            }
        }

        private enum CodingKeys: String, CodingKey {
            case integerValue
            case listOfStringValue
            case stringValue
        }
    }

    // MARK: Shapes

    public struct CreateMigrationWorkflowRequest: AWSEncodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let applicationConfigurationId: String
        /// The description of the migration workflow.
        public let description: String?
        /// The input parameters required to create a migration workflow.
        public let inputParameters: [String: StepInput]
        /// The name of the migration workflow.
        public let name: String
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags to add on a migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String

        public init(applicationConfigurationId: String, description: String? = nil, inputParameters: [String: StepInput], name: String, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String) {
            self.applicationConfigurationId = applicationConfigurationId
            self.description = description
            self.inputParameters = inputParameters
            self.name = name
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.inputParameters.forEach {
                try validate($0.key, name: "inputParameters.key", parent: name, max: 100)
                try validate($0.key, name: "inputParameters.key", parent: name, min: 1)
                try validate($0.key, name: "inputParameters.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try $0.value.validate(name: "\(name).inputParameters[\"\($0.key)\"]")
            }
            try self.stepTargets?.forEach {
                try validate($0, name: "stepTargets[]", parent: name, max: 100)
            }
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 100)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 100)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationConfigurationId
            case description
            case inputParameters
            case name
            case stepTargets
            case tags
            case templateId
        }
    }

    public struct CreateMigrationWorkflowResponse: AWSDecodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags to add on a migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// The inputs for creating a migration workflow.
        public let workflowInputs: [String: StepInput]?

        public init(adsApplicationConfigurationId: String? = nil, arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.status = status
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId
            case arn
            case creationTime
            case description
            case id
            case name
            case status
            case stepTargets
            case tags
            case templateId
            case workflowInputs
        }
    }

    public struct CreateWorkflowStepGroupRequest: AWSEncodableShape {
        /// The description of the step group.
        public let description: String?
        /// The name of the step group.
        public let name: String
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The ID of the migration workflow that will contain the step group.
        public let workflowId: String

        public init(description: String? = nil, name: String, next: [String]? = nil, previous: [String]? = nil, workflowId: String) {
            self.description = description
            self.name = name
            self.next = next
            self.previous = previous
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 100)
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 100)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case next
            case previous
            case workflowId
        }
    }

    public struct CreateWorkflowStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group is created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow that contains the step group.
        public let workflowId: String?

        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case id
            case name
            case next
            case previous
            case tools
            case workflowId
        }
    }

    public struct CreateWorkflowStepRequest: AWSEncodableShape {
        /// The description of the step.
        public let description: String?
        /// The name of the step.
        public let name: String
        /// The next step.
        public let next: [String]?
        /// The key value pairs added for the expected output.
        public let outputs: [WorkflowStepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType
        /// The ID of the step group.
        public let stepGroupId: String
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String
        /// The custom script to run tests on source or target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        public init(description: String? = nil, name: String, next: [String]? = nil, outputs: [WorkflowStepOutput]? = nil, previous: [String]? = nil, stepActionType: StepActionType, stepGroupId: String, stepTarget: [String]? = nil, workflowId: String, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.description = description
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepTarget = stepTarget
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 100)
            }
            try self.outputs?.forEach {
                try $0.validate(name: "\(name).outputs[]")
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 100)
            }
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.stepTarget?.forEach {
                try validate($0, name: "stepTarget[]", parent: name, max: 100)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.workflowStepAutomationConfiguration?.validate(name: "\(name).workflowStepAutomationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case next
            case outputs
            case previous
            case stepActionType
            case stepGroupId
            case stepTarget
            case workflowId
            case workflowStepAutomationConfiguration
        }
    }

    public struct CreateWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        public init(id: String? = nil, name: String? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.name = name
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
            case stepGroupId
            case workflowId
        }
    }

    public struct DeleteMigrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the migration workflow you want to delete.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?

        public init(arn: String? = nil, id: String? = nil, status: MigrationWorkflowStatusEnum? = nil) {
            self.arn = arn
            self.id = id
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case id
            case status
        }
    }

    public struct DeleteWorkflowStepGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The ID of the step group you want to delete.
        public let id: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(id: String, workflowId: String) {
            self.id = id
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWorkflowStepGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteWorkflowStepRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "stepGroupId", location: .querystring("stepGroupId")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The ID of the step you want to delete.
        public let id: String
        /// The ID of the step group that contains the step you want to delete.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteWorkflowStepResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GetMigrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the migration workflow.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationWorkflowResponse: AWSDecodableShape {
        /// The configuration ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationName: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// Get a list of completed steps in the migration workflow.
        public let completedSteps: Int?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The time at which the migration workflow ended.
        public let endTime: Date?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last modified.
        public let lastModifiedTime: Date?
        /// The time at which the migration workflow was last started.
        public let lastStartTime: Date?
        /// The time at which the migration workflow was last stopped.
        public let lastStopTime: Date?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The tags added to the migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The total number of steps in the migration workflow.
        public let totalSteps: Int?
        /// The Amazon S3 bucket where the migration logs are stored.
        public let workflowBucket: String?
        /// The inputs required for creating the migration workflow.
        public let workflowInputs: [String: StepInput]?

        public init(adsApplicationConfigurationId: String? = nil, adsApplicationName: String? = nil, arn: String? = nil, completedSteps: Int? = nil, creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, id: String? = nil, lastModifiedTime: Date? = nil, lastStartTime: Date? = nil, lastStopTime: Date? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil, tags: [String: String]? = nil, templateId: String? = nil, tools: [Tool]? = nil, totalSteps: Int? = nil, workflowBucket: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.adsApplicationName = adsApplicationName
            self.arn = arn
            self.completedSteps = completedSteps
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.lastStartTime = lastStartTime
            self.lastStopTime = lastStopTime
            self.name = name
            self.status = status
            self.statusMessage = statusMessage
            self.tags = tags
            self.templateId = templateId
            self.tools = tools
            self.totalSteps = totalSteps
            self.workflowBucket = workflowBucket
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId
            case adsApplicationName
            case arn
            case completedSteps
            case creationTime
            case description
            case endTime
            case id
            case lastModifiedTime
            case lastStartTime
            case lastStopTime
            case name
            case status
            case statusMessage
            case tags
            case templateId
            case tools
            case totalSteps
            case workflowBucket
            case workflowInputs
        }
    }

    public struct GetMigrationWorkflowTemplateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the template.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetMigrationWorkflowTemplateResponse: AWSDecodableShape {
        /// The time at which the template was last created.
        public let creationTime: Date?
        /// The time at which the template was last created.
        public let description: String?
        /// The ID of the template.
        public let id: String?
        /// The inputs provided for the creation of the migration workflow.
        public let inputs: [TemplateInput]?
        /// The name of the template.
        public let name: String?
        /// The status of the template.
        public let status: TemplateStatus?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?

        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, inputs: [TemplateInput]? = nil, name: String? = nil, status: TemplateStatus? = nil, tools: [Tool]? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.inputs = inputs
            self.name = name
            self.status = status
            self.tools = tools
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case id
            case inputs
            case name
            case status
            case tools
        }
    }

    public struct GetTemplateStepGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "templateId", location: .uri("templateId"))
        ]

        /// The ID of the step group.
        public let id: String
        /// The ID of the template.
        public let templateId: String

        public init(id: String, templateId: String) {
            self.id = id
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTemplateStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group was created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?
        /// The ID of the template.
        public let templateId: String?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?

        public init(creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil, templateId: String? = nil, tools: [Tool]? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.previous = previous
            self.status = status
            self.templateId = templateId
            self.tools = tools
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case id
            case lastModifiedTime
            case name
            case next
            case previous
            case status
            case templateId
            case tools
        }
    }

    public struct GetTemplateStepRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "stepGroupId", location: .querystring("stepGroupId")),
            AWSMemberEncoding(label: "templateId", location: .querystring("templateId"))
        ]

        /// The ID of the step.
        public let id: String
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the template.
        public let templateId: String

        public init(id: String, stepGroupId: String, templateId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTemplateStepResponse: AWSDecodableShape {
        /// The time at which the step was created.
        public let creationTime: String?
        /// The description of the step.
        public let description: String?
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The outputs of the step.
        public let outputs: [StepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The custom script to run tests on source or target environments.
        public let stepAutomationConfiguration: StepAutomationConfiguration?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the template.
        public let templateId: String?

        public init(creationTime: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil, next: [String]? = nil, outputs: [StepOutput]? = nil, previous: [String]? = nil, stepActionType: StepActionType? = nil, stepAutomationConfiguration: StepAutomationConfiguration? = nil, stepGroupId: String? = nil, templateId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepAutomationConfiguration = stepAutomationConfiguration
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case id
            case name
            case next
            case outputs
            case previous
            case stepActionType
            case stepAutomationConfiguration
            case stepGroupId
            case templateId
        }
    }

    public struct GetWorkflowStepGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The ID of the step group.
        public let id: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(id: String, workflowId: String) {
            self.id = id
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowStepGroupResponse: AWSDecodableShape {
        /// The time at which the step group was created.
        public let creationTime: Date?
        /// The description of the step group.
        public let description: String?
        /// The time at which the step group ended.
        public let endTime: Date?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The owner of the step group.
        public let owner: Owner?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow.
        public let workflowId: String?

        public init(creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.status = status
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case endTime
            case id
            case lastModifiedTime
            case name
            case next
            case owner
            case previous
            case status
            case tools
            case workflowId
        }
    }

    public struct GetWorkflowStepRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "stepGroupId", location: .querystring("stepGroupId")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The ID of the step.
        public let id: String
        /// desThe ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkflowStepResponse: AWSDecodableShape {
        /// The time at which the step was created.
        public let creationTime: Date?
        /// The description of the step.
        public let description: String?
        /// The time at which the step ended.
        public let endTime: Date?
        /// The time at which the workflow was last started.
        public let lastStartTime: Date?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The number of servers that have been migrated.
        public let noOfSrvCompleted: Int?
        /// The number of servers that have failed to migrate.
        public let noOfSrvFailed: Int?
        /// The outputs of the step.
        public let outputs: [WorkflowStepOutput]?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The output location of the script.
        public let scriptOutputLocation: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the step.
        public let stepId: String?
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The total number of servers that have been migrated.
        public let totalNoOfSrv: Int?
        /// The ID of the migration workflow.
        public let workflowId: String?
        /// The custom script to run tests on source or target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        public init(creationTime: Date? = nil, description: String? = nil, endTime: Date? = nil, lastStartTime: Date? = nil, name: String? = nil, next: [String]? = nil, noOfSrvCompleted: Int? = nil, noOfSrvFailed: Int? = nil, outputs: [WorkflowStepOutput]? = nil, owner: Owner? = nil, previous: [String]? = nil, scriptOutputLocation: String? = nil, status: StepStatus? = nil, statusMessage: String? = nil, stepActionType: StepActionType? = nil, stepGroupId: String? = nil, stepId: String? = nil, stepTarget: [String]? = nil, totalNoOfSrv: Int? = nil, workflowId: String? = nil, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.creationTime = creationTime
            self.description = description
            self.endTime = endTime
            self.lastStartTime = lastStartTime
            self.name = name
            self.next = next
            self.noOfSrvCompleted = noOfSrvCompleted
            self.noOfSrvFailed = noOfSrvFailed
            self.outputs = outputs
            self.owner = owner
            self.previous = previous
            self.scriptOutputLocation = scriptOutputLocation
            self.status = status
            self.statusMessage = statusMessage
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepId = stepId
            self.stepTarget = stepTarget
            self.totalNoOfSrv = totalNoOfSrv
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case description
            case endTime
            case lastStartTime
            case name
            case next
            case noOfSrvCompleted
            case noOfSrvFailed
            case outputs
            case owner
            case previous
            case scriptOutputLocation
            case status
            case statusMessage
            case stepActionType
            case stepGroupId
            case stepId
            case stepTarget
            case totalNoOfSrv
            case workflowId
            case workflowStepAutomationConfiguration
        }
    }

    public struct ListMigrationWorkflowTemplatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "name", location: .querystring("name")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The name of the template.
        public let name: String?
        /// The pagination token.
        public let nextToken: String?

        public init(maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMigrationWorkflowTemplatesResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of the template.
        public let templateSummary: [TemplateSummary]

        public init(nextToken: String? = nil, templateSummary: [TemplateSummary]) {
            self.nextToken = nextToken
            self.templateSummary = templateSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case templateSummary
        }
    }

    public struct ListMigrationWorkflowsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "adsApplicationConfigurationName", location: .querystring("adsApplicationConfigurationName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "name", location: .querystring("name")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "status", location: .querystring("status")),
            AWSMemberEncoding(label: "templateId", location: .querystring("templateId"))
        ]

        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationName: String?
        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The name of the migration workflow.
        public let name: String?
        /// The pagination token.
        public let nextToken: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The ID of the template.
        public let templateId: String?

        public init(adsApplicationConfigurationName: String? = nil, maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, status: MigrationWorkflowStatusEnum? = nil, templateId: String? = nil) {
            self.adsApplicationConfigurationName = adsApplicationConfigurationName
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.status = status
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, max: 100)
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, min: 1)
            try self.validate(self.adsApplicationConfigurationName, name: "adsApplicationConfigurationName", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMigrationWorkflowsResponse: AWSDecodableShape {
        /// The summary of the migration workflow.
        public let migrationWorkflowSummary: [MigrationWorkflowSummary]
        /// The pagination token.
        public let nextToken: String?

        public init(migrationWorkflowSummary: [MigrationWorkflowSummary], nextToken: String? = nil) {
            self.migrationWorkflowSummary = migrationWorkflowSummary
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case migrationWorkflowSummary
            case nextToken
        }
    }

    public struct ListPluginsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of plugins that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPluginsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Migration Hub Orchestrator plugins.
        public let plugins: [PluginSummary]?

        public init(nextToken: String? = nil, plugins: [PluginSummary]? = nil) {
            self.nextToken = nextToken
            self.plugins = plugins
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case plugins
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:workflow/[.]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags added to a resource.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListTemplateStepGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "templateId", location: .uri("templateId"))
        ]

        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the template.
        public let templateId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, templateId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTemplateStepGroupsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of the step group in the template.
        public let templateStepGroupSummary: [TemplateStepGroupSummary]

        public init(nextToken: String? = nil, templateStepGroupSummary: [TemplateStepGroupSummary]) {
            self.nextToken = nextToken
            self.templateStepGroupSummary = templateStepGroupSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case templateStepGroupSummary
        }
    }

    public struct ListTemplateStepsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "stepGroupId", location: .querystring("stepGroupId")),
            AWSMemberEncoding(label: "templateId", location: .querystring("templateId"))
        ]

        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the template.
        public let templateId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, stepGroupId: String, templateId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stepGroupId = stepGroupId
            self.templateId = templateId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.templateId, name: "templateId", parent: name, max: 100)
            try self.validate(self.templateId, name: "templateId", parent: name, min: 1)
            try self.validate(self.templateId, name: "templateId", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTemplateStepsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The list of summaries of steps in a template.
        public let templateStepSummaryList: [TemplateStepSummary]?

        public init(nextToken: String? = nil, templateStepSummaryList: [TemplateStepSummary]? = nil) {
            self.nextToken = nextToken
            self.templateStepSummaryList = templateStepSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case templateStepSummaryList
        }
    }

    public struct ListWorkflowStepGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, workflowId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListWorkflowStepGroupsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of step groups in a migration workflow.
        public let workflowStepGroupsSummary: [WorkflowStepGroupSummary]

        public init(nextToken: String? = nil, workflowStepGroupsSummary: [WorkflowStepGroupSummary]) {
            self.nextToken = nextToken
            self.workflowStepGroupsSummary = workflowStepGroupsSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case workflowStepGroupsSummary
        }
    }

    public struct ListWorkflowStepsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "stepGroupId", location: .uri("stepGroupId")),
            AWSMemberEncoding(label: "workflowId", location: .uri("workflowId"))
        ]

        /// The maximum number of results that can be returned.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, stepGroupId: String, workflowId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".*\\S.*")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListWorkflowStepsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The summary of steps in a migration workflow.
        public let workflowStepsSummary: [WorkflowStepSummary]

        public init(nextToken: String? = nil, workflowStepsSummary: [WorkflowStepSummary]) {
            self.nextToken = nextToken
            self.workflowStepsSummary = workflowStepsSummary
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case workflowStepsSummary
        }
    }

    public struct MigrationWorkflowSummary: AWSDecodableShape {
        /// The name of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationName: String?
        /// The steps completed in the migration workflow.
        public let completedSteps: Int?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The time at which the migration workflow ended.
        public let endTime: Date?
        /// The ID of the migration workflow.
        public let id: String?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The ID of the template.
        public let templateId: String?
        /// All the steps in a migration workflow.
        public let totalSteps: Int?

        public init(adsApplicationConfigurationName: String? = nil, completedSteps: Int? = nil, creationTime: Date? = nil, endTime: Date? = nil, id: String? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil, templateId: String? = nil, totalSteps: Int? = nil) {
            self.adsApplicationConfigurationName = adsApplicationConfigurationName
            self.completedSteps = completedSteps
            self.creationTime = creationTime
            self.endTime = endTime
            self.id = id
            self.name = name
            self.status = status
            self.statusMessage = statusMessage
            self.templateId = templateId
            self.totalSteps = totalSteps
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationName
            case completedSteps
            case creationTime
            case endTime
            case id
            case name
            case status
            case statusMessage
            case templateId
            case totalSteps
        }
    }

    public struct PlatformCommand: AWSEncodableShape & AWSDecodableShape {
        /// Command for Linux.
        public let linux: String?
        /// Command for Windows.
        public let windows: String?

        public init(linux: String? = nil, windows: String? = nil) {
            self.linux = linux
            self.windows = windows
        }

        private enum CodingKeys: String, CodingKey {
            case linux
            case windows
        }
    }

    public struct PlatformScriptKey: AWSEncodableShape & AWSDecodableShape {
        /// The script location for Linux.
        public let linux: String?
        /// The script location for Windows.
        public let windows: String?

        public init(linux: String? = nil, windows: String? = nil) {
            self.linux = linux
            self.windows = windows
        }

        public func validate(name: String) throws {
            try self.validate(self.linux, name: "linux", parent: name, max: 1024)
            try self.validate(self.windows, name: "windows", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case linux
            case windows
        }
    }

    public struct PluginSummary: AWSDecodableShape {
        /// The name of the host.
        public let hostname: String?
        /// The IP address at which the plugin is located.
        public let ipAddress: String?
        /// The ID of the plugin.
        public let pluginId: String?
        /// The time at which the plugin was registered.
        public let registeredTime: String?
        /// The status of the plugin.
        public let status: PluginHealth?
        /// The version of the plugin.
        public let version: String?

        public init(hostname: String? = nil, ipAddress: String? = nil, pluginId: String? = nil, registeredTime: String? = nil, status: PluginHealth? = nil, version: String? = nil) {
            self.hostname = hostname
            self.ipAddress = ipAddress
            self.pluginId = pluginId
            self.registeredTime = registeredTime
            self.status = status
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case hostname
            case ipAddress
            case pluginId
            case registeredTime
            case status
            case version
        }
    }

    public struct RetryWorkflowStepRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "stepGroupId", location: .querystring("stepGroupId")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The ID of the step.
        public let id: String
        /// The ID of the step group.
        public let stepGroupId: String
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(id: String, stepGroupId: String, workflowId: String) {
            self.id = id
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RetryWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        public init(id: String? = nil, status: StepStatus? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.status = status
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case status
            case stepGroupId
            case workflowId
        }
    }

    public struct StartMigrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the migration workflow.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StartMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last started.
        public let lastStartTime: Date?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?

        public init(arn: String? = nil, id: String? = nil, lastStartTime: Date? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil) {
            self.arn = arn
            self.id = id
            self.lastStartTime = lastStartTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case id
            case lastStartTime
            case status
            case statusMessage
        }
    }

    public struct StepAutomationConfiguration: AWSDecodableShape {
        /// The command to run the script.
        public let command: PlatformCommand?
        /// The source or target environment.
        public let runEnvironment: RunEnvironment?
        /// The Amazon S3 bucket where the script is located.
        public let scriptLocationS3Bucket: String?
        /// The Amazon S3 key for the script location.
        public let scriptLocationS3Key: PlatformScriptKey?
        /// The servers on which to run the script.
        public let targetType: TargetType?

        public init(command: PlatformCommand? = nil, runEnvironment: RunEnvironment? = nil, scriptLocationS3Bucket: String? = nil, scriptLocationS3Key: PlatformScriptKey? = nil, targetType: TargetType? = nil) {
            self.command = command
            self.runEnvironment = runEnvironment
            self.scriptLocationS3Bucket = scriptLocationS3Bucket
            self.scriptLocationS3Key = scriptLocationS3Key
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case command
            case runEnvironment
            case scriptLocationS3Bucket
            case scriptLocationS3Key
            case targetType
        }
    }

    public struct StepOutput: AWSDecodableShape {
        /// The data type of the step output.
        public let dataType: DataType?
        /// The name of the step.
        public let name: String?
        /// Determine if an output is required from a step.
        public let required: Bool?

        public init(dataType: DataType? = nil, name: String? = nil, required: Bool? = nil) {
            self.dataType = dataType
            self.name = name
            self.required = required
        }

        private enum CodingKeys: String, CodingKey {
            case dataType
            case name
            case required
        }
    }

    public struct StopMigrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The ID of the migration workflow.
        public let id: String

        public init(id: String) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopMigrationWorkflowResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was stopped.
        public let lastStopTime: Date?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The status message of the migration workflow.
        public let statusMessage: String?

        public init(arn: String? = nil, id: String? = nil, lastStopTime: Date? = nil, status: MigrationWorkflowStatusEnum? = nil, statusMessage: String? = nil) {
            self.arn = arn
            self.id = id
            self.lastStopTime = lastStopTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case id
            case lastStopTime
            case status
            case statusMessage
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the resource to which you want to add tags.
        public let resourceArn: String
        /// A collection of labels, in the form of key:value pairs, that apply to this resource.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:workflow/[.]*$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TemplateInput: AWSDecodableShape {
        /// The data type of the template input.
        public let dataType: DataType?
        /// The name of the template.
        public let inputName: String?
        /// Determine if an input is required from the template.
        public let required: Bool?

        public init(dataType: DataType? = nil, inputName: String? = nil, required: Bool? = nil) {
            self.dataType = dataType
            self.inputName = inputName
            self.required = required
        }

        private enum CodingKeys: String, CodingKey {
            case dataType
            case inputName
            case required
        }
    }

    public struct TemplateStepGroupSummary: AWSDecodableShape {
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?

        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
            case next
            case previous
        }
    }

    public struct TemplateStepSummary: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The servers on which to run the script.
        public let targetType: TargetType?
        /// The ID of the template.
        public let templateId: String?

        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, stepActionType: StepActionType? = nil, stepGroupId: String? = nil, targetType: TargetType? = nil, templateId: String? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.targetType = targetType
            self.templateId = templateId
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
            case next
            case owner
            case previous
            case stepActionType
            case stepGroupId
            case targetType
            case templateId
        }
    }

    public struct TemplateSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the template.
        public let arn: String?
        /// The description of the template.
        public let description: String?
        /// The ID of the template.
        public let id: String?
        /// The name of the template.
        public let name: String?

        public init(arn: String? = nil, description: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.description = description
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case description
            case id
            case name
        }
    }

    public struct Tool: AWSDecodableShape {
        /// The name of an AWS service.
        public let name: String?
        /// The URL of an AWS service.
        public let url: String?

        public init(name: String? = nil, url: String? = nil) {
            self.name = name
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case url
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The Amazon Resource Name (ARN) of the resource from which you want to remove tags.
        public let resourceArn: String
        /// One or more tag keys. Specify only the tag keys, not the tag values.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:migrationhub-orchestrator:[a-z0-9-]+:[0-9]+:workflow/[.]*$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateMigrationWorkflowRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String
        /// The input parameters required to update a migration workflow.
        public let inputParameters: [String: StepInput]?
        /// The name of the migration workflow.
        public let name: String?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?

        public init(description: String? = nil, id: String, inputParameters: [String: StepInput]? = nil, name: String? = nil, stepTargets: [String]? = nil) {
            self.description = description
            self.id = id
            self.inputParameters = inputParameters
            self.name = name
            self.stepTargets = stepTargets
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.inputParameters?.forEach {
                try validate($0.key, name: "inputParameters.key", parent: name, max: 100)
                try validate($0.key, name: "inputParameters.key", parent: name, min: 1)
                try validate($0.key, name: "inputParameters.key", parent: name, pattern: "^[a-zA-Z0-9-_ ()]+$")
                try $0.value.validate(name: "\(name).inputParameters[\"\($0.key)\"]")
            }
            try self.stepTargets?.forEach {
                try validate($0, name: "stepTargets[]", parent: name, max: 100)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case inputParameters
            case name
            case stepTargets
        }
    }

    public struct UpdateMigrationWorkflowResponse: AWSDecodableShape {
        /// The ID of the application configured in Application Discovery Service.
        public let adsApplicationConfigurationId: String?
        /// The Amazon Resource Name (ARN) of the migration workflow.
        public let arn: String?
        /// The time at which the migration workflow was created.
        public let creationTime: Date?
        /// The description of the migration workflow.
        public let description: String?
        /// The ID of the migration workflow.
        public let id: String?
        /// The time at which the migration workflow was last modified.
        public let lastModifiedTime: Date?
        /// The name of the migration workflow.
        public let name: String?
        /// The status of the migration workflow.
        public let status: MigrationWorkflowStatusEnum?
        /// The servers on which a step will be run.
        public let stepTargets: [String]?
        /// The tags added to the migration workflow.
        public let tags: [String: String]?
        /// The ID of the template.
        public let templateId: String?
        /// The inputs required to update a migration workflow.
        public let workflowInputs: [String: StepInput]?

        public init(adsApplicationConfigurationId: String? = nil, arn: String? = nil, creationTime: Date? = nil, description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, status: MigrationWorkflowStatusEnum? = nil, stepTargets: [String]? = nil, tags: [String: String]? = nil, templateId: String? = nil, workflowInputs: [String: StepInput]? = nil) {
            self.adsApplicationConfigurationId = adsApplicationConfigurationId
            self.arn = arn
            self.creationTime = creationTime
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.status = status
            self.stepTargets = stepTargets
            self.tags = tags
            self.templateId = templateId
            self.workflowInputs = workflowInputs
        }

        private enum CodingKeys: String, CodingKey {
            case adsApplicationConfigurationId
            case arn
            case creationTime
            case description
            case id
            case lastModifiedTime
            case name
            case status
            case stepTargets
            case tags
            case templateId
            case workflowInputs
        }
    }

    public struct UpdateWorkflowStepGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id")),
            AWSMemberEncoding(label: "workflowId", location: .querystring("workflowId"))
        ]

        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String

        public init(description: String? = nil, id: String, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, workflowId: String) {
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.previous = previous
            self.workflowId = workflowId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 100)
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 100)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case next
            case previous
        }
    }

    public struct UpdateWorkflowStepGroupResponse: AWSDecodableShape {
        /// The description of the step group.
        public let description: String?
        /// The ID of the step group.
        public let id: String?
        /// The time at which the step group was last modified.
        public let lastModifiedTime: Date?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The previous step group.
        public let previous: [String]?
        /// List of AWS services utilized in a migration workflow.
        public let tools: [Tool]?
        /// The ID of the migration workflow.
        public let workflowId: String?

        public init(description: String? = nil, id: String? = nil, lastModifiedTime: Date? = nil, name: String? = nil, next: [String]? = nil, previous: [String]? = nil, tools: [Tool]? = nil, workflowId: String? = nil) {
            self.description = description
            self.id = id
            self.lastModifiedTime = lastModifiedTime
            self.name = name
            self.next = next
            self.previous = previous
            self.tools = tools
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case id
            case lastModifiedTime
            case name
            case next
            case previous
            case tools
            case workflowId
        }
    }

    public struct UpdateWorkflowStepRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "id", location: .uri("id"))
        ]

        /// The description of the step.
        public let description: String?
        /// The ID of the step.
        public let id: String
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The outputs of a step.
        public let outputs: [WorkflowStepOutput]?
        /// The previous step.
        public let previous: [String]?
        /// The status of the step.
        public let status: StepStatus?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step group.
        public let stepGroupId: String
        /// The servers on which a step will be run.
        public let stepTarget: [String]?
        /// The ID of the migration workflow.
        public let workflowId: String
        /// The custom script to run tests on the source and target environments.
        public let workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration?

        public init(description: String? = nil, id: String, name: String? = nil, next: [String]? = nil, outputs: [WorkflowStepOutput]? = nil, previous: [String]? = nil, status: StepStatus? = nil, stepActionType: StepActionType? = nil, stepGroupId: String, stepTarget: [String]? = nil, workflowId: String, workflowStepAutomationConfiguration: WorkflowStepAutomationConfiguration? = nil) {
            self.description = description
            self.id = id
            self.name = name
            self.next = next
            self.outputs = outputs
            self.previous = previous
            self.status = status
            self.stepActionType = stepActionType
            self.stepGroupId = stepGroupId
            self.stepTarget = stepTarget
            self.workflowId = workflowId
            self.workflowStepAutomationConfiguration = workflowStepAutomationConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[-a-zA-Z0-9_.+, ]*$")
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.next?.forEach {
                try validate($0, name: "next[]", parent: name, max: 100)
            }
            try self.outputs?.forEach {
                try $0.validate(name: "\(name).outputs[]")
            }
            try self.previous?.forEach {
                try validate($0, name: "previous[]", parent: name, max: 100)
            }
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, max: 100)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, min: 1)
            try self.validate(self.stepGroupId, name: "stepGroupId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.stepTarget?.forEach {
                try validate($0, name: "stepTarget[]", parent: name, max: 100)
            }
            try self.validate(self.workflowId, name: "workflowId", parent: name, max: 100)
            try self.validate(self.workflowId, name: "workflowId", parent: name, min: 1)
            try self.validate(self.workflowId, name: "workflowId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.workflowStepAutomationConfiguration?.validate(name: "\(name).workflowStepAutomationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case next
            case outputs
            case previous
            case status
            case stepActionType
            case stepGroupId
            case stepTarget
            case workflowId
            case workflowStepAutomationConfiguration
        }
    }

    public struct UpdateWorkflowStepResponse: AWSDecodableShape {
        /// The ID of the step.
        public let id: String?
        /// The name of the step.
        public let name: String?
        /// The ID of the step group.
        public let stepGroupId: String?
        /// The ID of the migration workflow.
        public let workflowId: String?

        public init(id: String? = nil, name: String? = nil, stepGroupId: String? = nil, workflowId: String? = nil) {
            self.id = id
            self.name = name
            self.stepGroupId = stepGroupId
            self.workflowId = workflowId
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
            case stepGroupId
            case workflowId
        }
    }

    public struct WorkflowStepAutomationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The command required to run the script.
        public let command: PlatformCommand?
        /// The source or target environment.
        public let runEnvironment: RunEnvironment?
        /// The Amazon S3 bucket where the script is located.
        public let scriptLocationS3Bucket: String?
        /// The Amazon S3 key for the script location.
        public let scriptLocationS3Key: PlatformScriptKey?
        /// The servers on which to run the script.
        public let targetType: TargetType?

        public init(command: PlatformCommand? = nil, runEnvironment: RunEnvironment? = nil, scriptLocationS3Bucket: String? = nil, scriptLocationS3Key: PlatformScriptKey? = nil, targetType: TargetType? = nil) {
            self.command = command
            self.runEnvironment = runEnvironment
            self.scriptLocationS3Bucket = scriptLocationS3Bucket
            self.scriptLocationS3Key = scriptLocationS3Key
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.scriptLocationS3Bucket, name: "scriptLocationS3Bucket", parent: name, max: 63)
            try self.validate(self.scriptLocationS3Bucket, name: "scriptLocationS3Bucket", parent: name, pattern: "^[0-9a-z]+[0-9a-z\\.\\-]*[0-9a-z]+$")
            try self.scriptLocationS3Key?.validate(name: "\(name).scriptLocationS3Key")
        }

        private enum CodingKeys: String, CodingKey {
            case command
            case runEnvironment
            case scriptLocationS3Bucket
            case scriptLocationS3Key
            case targetType
        }
    }

    public struct WorkflowStepGroupSummary: AWSDecodableShape {
        /// The ID of the step group.
        public let id: String?
        /// The name of the step group.
        public let name: String?
        /// The next step group.
        public let next: [String]?
        /// The owner of the step group.
        public let owner: Owner?
        /// The previous step group.
        public let previous: [String]?
        /// The status of the step group.
        public let status: StepGroupStatus?

        public init(id: String? = nil, name: String? = nil, next: [String]? = nil, owner: Owner? = nil, previous: [String]? = nil, status: StepGroupStatus? = nil) {
            self.id = id
            self.name = name
            self.next = next
            self.owner = owner
            self.previous = previous
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case id
            case name
            case next
            case owner
            case previous
            case status
        }
    }

    public struct WorkflowStepOutput: AWSEncodableShape & AWSDecodableShape {
        /// The data type of the output.
        public let dataType: DataType?
        /// The name of the step.
        public let name: String?
        /// Determine if an output is required from a step.
        public let required: Bool?
        /// The value of the output.
        public let value: WorkflowStepOutputUnion?

        public init(dataType: DataType? = nil, name: String? = nil, required: Bool? = nil, value: WorkflowStepOutputUnion? = nil) {
            self.dataType = dataType
            self.name = name
            self.required = required
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[-a-zA-Z0-9_.+]+[-a-zA-Z0-9_.+ ]*$")
            try self.value?.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case dataType
            case name
            case required
            case value
        }
    }

    public struct WorkflowStepSummary: AWSDecodableShape {
        /// The description of the step.
        public let description: String?
        /// The name of the step.
        public let name: String?
        /// The next step.
        public let next: [String]?
        /// The number of servers that have been migrated.
        public let noOfSrvCompleted: Int?
        /// The number of servers that have failed to migrate.
        public let noOfSrvFailed: Int?
        /// The owner of the step.
        public let owner: Owner?
        /// The previous step.
        public let previous: [String]?
        /// The location of the script.
        public let scriptLocation: String?
        /// The status of the step.
        public let status: StepStatus?
        /// The status message of the migration workflow.
        public let statusMessage: String?
        /// The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.
        public let stepActionType: StepActionType?
        /// The ID of the step.
        public let stepId: String?
        /// The total number of servers that have been migrated.
        public let totalNoOfSrv: Int?

        public init(description: String? = nil, name: String? = nil, next: [String]? = nil, noOfSrvCompleted: Int? = nil, noOfSrvFailed: Int? = nil, owner: Owner? = nil, previous: [String]? = nil, scriptLocation: String? = nil, status: StepStatus? = nil, statusMessage: String? = nil, stepActionType: StepActionType? = nil, stepId: String? = nil, totalNoOfSrv: Int? = nil) {
            self.description = description
            self.name = name
            self.next = next
            self.noOfSrvCompleted = noOfSrvCompleted
            self.noOfSrvFailed = noOfSrvFailed
            self.owner = owner
            self.previous = previous
            self.scriptLocation = scriptLocation
            self.status = status
            self.statusMessage = statusMessage
            self.stepActionType = stepActionType
            self.stepId = stepId
            self.totalNoOfSrv = totalNoOfSrv
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case name
            case next
            case noOfSrvCompleted
            case noOfSrvFailed
            case owner
            case previous
            case scriptLocation
            case status
            case statusMessage
            case stepActionType
            case stepId
            case totalNoOfSrv
        }
    }
}

// MARK: - Errors

/// Error enum for MigrationHubOrchestrator
public struct MigrationHubOrchestratorErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize MigrationHubOrchestrator
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have sufficient access to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// An internal error has occurred.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The resource is not available.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request was denied due to request throttling.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The input fails to satisfy the constraints specified by an AWS service.
    public static var validationException: Self { .init(.validationException) }
}

extension MigrationHubOrchestratorErrorType: Equatable {
    public static func == (lhs: MigrationHubOrchestratorErrorType, rhs: MigrationHubOrchestratorErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension MigrationHubOrchestratorErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
